<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
    Did something change last night? I can no longer log into Reddit using PRAW 2.0.15 : Forums : PythonAnywhere
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Forums : PythonAnywhere">
        <meta name="author" content="PythonAnywhere LLP">
        <meta name="google-site-verification" content="O4UxDrfcHjC44jybs2vajc1GgRkTKCTRgVzeV6I9V14" />

        <!-- Le styles -->
        <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
        <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="/static/anywhere/styles/bootstrap_base.css" rel="stylesheet">
        
    
    <link rel="stylesheet" href="/static/anywhere/styles/forums.css" type="text/css" media="screen" charset="utf-8" />

    <link rel="stylesheet" href="/static/pygments/style.css" type="text/css" media="screen" charset="utf-8" />

        <link rel="stylesheet" href="/static/jquery/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" charset="utf-8" />
        
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/forums/topic/623/rss" />

        <style type="text/css">
            body {
                height: auto;
            }
        </style>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <!-- Le fav and touch icons -->
        <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
        <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
    </head>

     <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div id="id_internal_nav_bar_container" class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="/"><img id="id_logo" src="/static/anywhere/images/logo-234x35.png" height="35" title="PythonAnywhere logo" alt="PythonAnywhere logo" /></a>
                    <div class="nav-collapse">
                        <ul id="id_header_links" class="nav">
                            <li><a id="id_feedback_link" class='feedback_link' href="">Send feedback</a></li>
                            <li><a id="id_forums_link" href="/forums/">Forums</a></li>
                            <li><a href="/wiki/" id="id_help_link">Help</a></li>
                            <li><a href="http://blog.pythonanywhere.com/" id="id_blog_link">Blog</a></li>
                            
                            
                                <li><a style="font-weight: bold;" href="/pricing/" id="id_pricing_link">Pricing & signup</a></li>
                                <li><a href="/login/?next=/forums/topic/623/" id="id_login_link">Log in</a></li>
                            
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="top-container" id="id_dummy"></div>

        

        
    
    <div class="container">
        <div class="row">
            <div class="span8 offset3">
                <h1>PythonAnywhere Forums</h1>
            </div>
        </div>



    <div class="row">
        <div class="span8 offset3">
            <p>
                <a href="/forums/start_topic/" id="id_start_new_topic">Start a new topic</a> |
                <a href="/forums/">Back to all topics</a> |
                <a href="/forums/topic/623/rss">This topic's RSS</a>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="span8 offset3 topic">
            <h2>Did something change last night? I can no longer log into Reddit using PRAW 2.0.15</h2>
        </div>
    </div>

    
        <div class="row">
            <div id="id_post_4542" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4542_content_text" class="span8">
                        <p>I've been running a script every day that logs into Reddit using PRAW, and it's worked every time until now, which is strange because I didn't change anything. Here's the traceback:</p>
<div class="codehilite"><pre><span class="nx">Traceback</span> <span class="p">(</span><span class="nx">most</span> <span class="nx">recent</span> <span class="nb">call</span> <span class="nb">last</span><span class="p">):</span>
  <span class="nb">File</span> <span class="s2">&quot;bravery20.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">1314</span><span class="p">,</span> <span class="k">in</span> <span class="o">&lt;</span><span class="nx">module</span><span class="o">&gt;</span>
    <span class="nx">r.login</span><span class="p">(</span><span class="n">username</span><span class="o">=</span><span class="nx">username</span><span class="p">,</span> <span class="n">password</span><span class="o">=</span><span class="nx">password</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/__init__.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">906</span><span class="p">,</span> <span class="k">in</span> <span class="nx">login</span>
    <span class="bp">self.</span><span class="nx">request_json</span><span class="p">(</span><span class="bp">self.</span><span class="nx">config</span><span class="err">[</span><span class="s1">&#39;login&#39;</span><span class="cp">]</span>, data=data)
  File &quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/decorators.py&quot;, line 223, in error_checked_function
    return_value = function(cls, *args, **kwargs)
  File &quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/__init__.py&quot;, line 407, in request_json
    response = self._request(url, params, data)
  File &quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/__init__.py&quot;, line 294, in _request
    timeout=timeout)
  File &quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/decorators.py&quot;, line 64, in __call__
    result = self.function(reddit_session, url, *args, **kwargs)
  File &quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/decorators.py&quot;, line 167, in __call__
    return self.function(*args, **kwargs)
  File &quot;/home/sotb2/.local/lib/python2.7/site-packages/praw/helpers.py&quot;, line 137, in _request
    allow_redirects=False, auth=auth)
  File &quot;/usr/local/lib/python2.7/site-packages/requests/sessions.py&quot;, line 399, in post
    return self.request(&#39;POST&#39;, url, data=data, **kwargs)
  File &quot;/usr/local/lib/python2.7/site-packages/requests/sessions.py&quot;, line 354, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/usr/local/lib/python2.7/site-packages/requests/sessions.py&quot;, line 460, in send
    r = adapter.send(request, **kwargs)
  File &quot;/usr/local/lib/python2.7/site-packages/requests/adapters.py&quot;, line 246, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;proxy.server&#39;, port=3128): Max retries exceeded with url: http://www.reddit.com/api/login/.json (Caused by 
<span class="nt">&lt;class</span> <span class="err">&#39;</span><span class="na">socket</span><span class="err">.</span><span class="na">error</span><span class="err">&#39;</span><span class="nt">&gt;</span>: <span class="cp">[</span><span class="nx">Errno</span> <span class="mi">111</span><span class="cp">]</span> Connection refused)
</pre></div>


<p>I'm logging in insecurely because I know PythonAnywhere free accounts don't support SSL, so that's not the problem here. Does it look like the issue is being caused by Reddit or by PythonAnywhere?</p>
<p>Thanks in advance.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4542_creator_details">
                            
                                
                            
                            sotb2
                            |
                            12
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4542_created_date">
                            May 9, 2013, 5:17 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4542">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4544" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4544_content_text" class="span8">
                        <p>It <em>looks</em> as though perhaps the PA proxy server was/is experiencing an outage, but that's a broad guess based on the traceback. Keep trying periodically, hopefully the PA devs will be able to shed more light.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4544_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            Cartroo
                            |
                            638
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4544_created_date">
                            May 9, 2013, 6:05 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4544">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4546" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4546_content_text" class="span8">
                        <p>Yup, it was a proxy issue.  Someone was hammering an online MMORPG and not getting in, and their script responded by retrying thousands of times a second.  I've killed the offending processes.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4546_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_4546_created_date">
                            May 9, 2013, 6:49 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4546">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4547" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4547_content_text" class="span8">
                        <p>That fixed it. Thanks!</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4547_creator_details">
                            
                                
                            
                            sotb2
                            |
                            12
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4547_created_date">
                            May 9, 2013, 10:27 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4547">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4549" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4549_content_text" class="span8">
                        <p>Also, free accounts do support port 443, not sure why you think they don't.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4549_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            a2j
                            |
                            549
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4549_created_date">
                            May 10, 2013, 1:58 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4549">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4551" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4551_content_text" class="span8">
                        <p>Now that you mention it, I think it's not that SSL per se is unsupported, but that the particular domain that Reddit uses for it (ssl.reddit.com) is not on the whitelist although the nonsecure domain (www.reddit.com) is.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4551_creator_details">
                            
                                
                            
                            sotb2
                            |
                            12
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4551_created_date">
                            May 10, 2013, 7:16 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4551">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4552" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4552_content_text" class="span8">
                        <p>Just checked this list. Maybe that's not it. There's something that prevents it, though. I'll see if I can figure that out.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4552_creator_details">
                            
                                
                            
                            sotb2
                            |
                            12
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4552_created_date">
                            May 10, 2013, 7:19 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4552">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4555" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4555_content_text" class="span8">
                        <p>I wonder if there's some way of using proxy authentication to prevent these issues where someone takes the proxy down by DoSing it (whether intentionally or not). Still, most standard proxies don't seem to be written with that sort of robustness in mind, so perhaps it wouldn't be so useful. Also, I'm not sure whether it's possible to add auth details to the standard proxy environment variables.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4555_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            Cartroo
                            |
                            638
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4555_created_date">
                            May 10, 2013, 10:41 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4555">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4585" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4585_content_text" class="span8">
                        <p>Or perhaps throttle proxy connections to no more than nnn per 5 minutes.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4585_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            a2j
                            |
                            549
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4585_created_date">
                            May 10, 2013, 7:37 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4585">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4598" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4598_content_text" class="span8">
                        <p>@sotb2  -- there is a bug in one of the more recent HTTP libraries (IIRC it's <code>urllib3</code>, which is used by <code>requests</code>) that makes it send incorrect data when connecting over https via a proxy.  So that might be why you thought we don't support SSL -- I see from your stacktrace that you're using <code>requests</code>.</p>
<p>@Cartroo, @a2j.  Right, identifying users to the proxy is tricky, so it's hard to do any kind of per-user rate limiting.  I think we just need better monitoring...</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4598_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_4598_created_date">
                            May 11, 2013, 7:54 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4598">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4604" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4604_content_text" class="span8">
                        <p>@giles: Sure, I totally understand it's a tricky problem. Monitoring is always a good thing, although it's always going to be a bit of a pain if someone has to manually investigate outages due to the server becoming overloaded.</p>
<p>If I come across any other bright ideas for how to identify traffic I'll let you know. I was wondering if Linux has a way to use, say, <a href="http://en.wikipedia.org/wiki/Multiprotocol_Label_Switching">MPLS</a> tags based on the sending user ID or something, but then again that probably won't fly unless you controlled all the underlying switching fabric. Hm. It's an interesting puzzle. (^_^)</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4604_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            Cartroo
                            |
                            638
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4604_created_date">
                            May 11, 2013, 10:26 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/623/#id_post_4604">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    

    




        <div id="id_footer" class="container">

            <footer id="id_copyright_div">
                <p>
                    Copyright &copy; 2013 PythonAnywhere LLP
                    &mdash;
                    <a href="/terms/">Terms</a>
                    &mdash;
                    <a href="/privacy/">Privacy</a><br/>
                    "Python" is a registered trademark of the Python Software Foundation.
                </p>
            </footer>

        </div>

        
        

        <div id="id_feedback_dialog" title="Help us improve" style="display:none">
    <div id="id_feedback_dialog_blurb_big" class="dialog_blurb_big">
        It's always a pleasure to hear from you!
    </div>
    <div id="id_feedback_dialog_blurb_small">
        Ask us a question, or tell us what you love or hate about PythonAnywhere.<br/>
        We'll get back to you over email ASAP.
    </div>
    <textarea id="id_feedback_dialog_text" rows="6"></textarea>
    <input id="id_feedback_dialog_email_address" type="text" class="default_prompt"/>
    <div id="id_feedback_dialog_error" class="pa_hidden">
        Sorry, there was an error connecting to the server. <br/>Please try again in a few moments...
    </div>
    <div class="dialog_buttons">
        <img id="id_feedback_dialog_spinner" src="/static/anywhere/images/spinner-small.gif" />
        <button class="btn btn-primary" id="id_feedback_dialog_ok_button">OK</button>
        <button class="btn" id="id_feedback_dialog_cancel_button">Cancel</button>
    </div>
</div>


        <!-- Le javascript
        ================================================== -->
        <!-- Placed at the end of the document so the pages load faster -->
        <script type="text/javascript" src="/static/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="/static/jquery/jquery-ui-1.8.11.custom.min.js"></script>
        <script src="/static/bootstrap/js/bootstrap-transition.js"></script>
        <script src="/static/bootstrap/js/bootstrap-alert.js"></script>
        <script src="/static/bootstrap/js/bootstrap-modal.js"></script>
        <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>
        <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tab.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>
        <script src="/static/bootstrap/js/bootstrap-popover.js"></script>
        <script src="/static/bootstrap/js/bootstrap-button.js"></script>
        <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>
        <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>
        <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>

        <script type="text/javascript">
            var urls = {};
            var Anywhere = {};
            Anywhere.urls = {};
        </script>
        <script type="text/javascript" src="/static/anywhere/scripts/ajax_utils.js"></script>

        <script type="text/javascript" src="/static/anywhere/scripts/feedback_dialog.js"></script>
        
        <script type="text/javascript">
            $(function() {
                $.extend(
                    urls,
                    {
                        feedback: '/feedback/submit/'
                    }
                );
                
                    Anywhere.FeedbackDialog.Initialise(urls, false);
                
            });
        </script>

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-18014859-6']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>

        



    </body>
</html>
